﻿using System;
using System.Data.Linq.Mapping;

namespace Southern.Models.Southern.Partials
{
    public class SysUser
    {
        private string _Address;
        private int _CreatedBy;
        private DateTime _CreatedDate;
        private string _DisplayName;
        private string _Email;
        private string _Mobile;
        private string _Password;
        private short _Status;
        private int _UserId;
        private string _Username;

        [Column(Storage = "_UserId", DbType = "Int NOT NULL")]
        public int UserId
        {
            get { return _UserId; }
            set
            {
                if ((_UserId != value))
                {
                    _UserId = value;
                }
            }
        }

        [Column(Storage = "_Username", DbType = "NVarChar(200) NOT NULL", CanBeNull = false)]
        public string Username
        {
            get { return _Username; }
            set
            {
                if ((_Username != value))
                {
                    _Username = value;
                }
            }
        }

        [Column(Storage = "_Password", DbType = "NVarChar(32) NOT NULL", CanBeNull = false)]
        public string Password
        {
            get { return _Password; }
            set
            {
                if ((_Password != value))
                {
                    _Password = value;
                }
            }
        }

        [Column(Storage = "_DisplayName", DbType = "NVarChar(200)")]
        public string DisplayName
        {
            get { return _DisplayName; }
            set
            {
                if ((_DisplayName != value))
                {
                    _DisplayName = value;
                }
            }
        }

        [Column(Storage = "_Email", DbType = "NVarChar(100)")]
        public string Email
        {
            get { return _Email; }
            set
            {
                if ((_Email != value))
                {
                    _Email = value;
                }
            }
        }

        [Column(Storage = "_Mobile", DbType = "VarChar(50)")]
        public string Mobile
        {
            get { return _Mobile; }
            set
            {
                if ((_Mobile != value))
                {
                    _Mobile = value;
                }
            }
        }

        [Column(Storage = "_Address", DbType = "NVarChar(300)")]
        public string Address
        {
            get { return _Address; }
            set
            {
                if ((_Address != value))
                {
                    _Address = value;
                }
            }
        }

        [Column(Storage = "_CreatedDate", DbType = "DateTime NOT NULL")]
        public DateTime CreatedDate
        {
            get { return _CreatedDate; }
            set
            {
                if ((_CreatedDate != value))
                {
                    _CreatedDate = value;
                }
            }
        }

        [Column(Storage = "_CreatedBy", DbType = "Int NOT NULL")]
        public int CreatedBy
        {
            get { return _CreatedBy; }
            set
            {
                if ((_CreatedBy != value))
                {
                    _CreatedBy = value;
                }
            }
        }

        [Column(Storage = "_Status", DbType = "SmallInt NOT NULL")]
        public short Status
        {
            get { return _Status; }
            set
            {
                if ((_Status != value))
                {
                    _Status = value;
                }
            }
        }
    }

    public enum StatusUser
    {
        Active = 1,
        Inactive = 0
    }
}